/********************************************************************************
 ***                                                                          *** 
 ********************************************************************************
 *                                                                              * 
 *           Prject Name : MEMORIA                                              * 
 *                                                                              * 
 *             File Name : wordline.h                                           * 
 *                                                                              * 
 *            Programmer : LBW                                                  * 
 *                                                                              * 
 *            Start Date : 2020/12/26                                           * 
 *                                                                              * 
 *           Last Update : 2020/12/26  [LBW]                                    * 
 *                                                                              * 
 *------------------------------------------------------------------------------*
 * Functions:                                                                   * 
 *==============================================================================*/

#ifndef WORDLINE_H
#define WORDLINE_H

#include <QWidget>

class Nail;
class WordLine : public QWidget
{
	Q_OBJECT
public:
	WordLine(QString,QVector<int>,QVector<int>,QString,bool randomEnable = false,QWidget *parent = 0);
	Nail *nailAt(int) const;
	int getNumOfNails() const;
protected:
	void paintEvent(QPaintEvent*);
private:
	void getRandomOrder();

	QVector<int> wordPos,wordLength;
	
	QVector<int> order;
	
	Nail *nails[30];

	int numOfNails;
	
	QStringList wordList;
};

#endif
